//+运算符的重载
#include <iostream>
using namespace std;
class Person
{
public:
    //+号运算重载函数--成员方法重载
    Person operator+(const Person &l){
        Person s;
        s.x=this->x+l.x;
        return s;
    }
    int x;
    Person(int x=0){
        this->x=x;
    }
};
int main()
{
    Person s1(3);
    Person s2;
    Person s3=s1+s2;
    cout<<s3.x<<endl;
    return 0;
}